﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Engine.Base.Helper
{
    public static class RenderHelper
    {
        public static Matrix CreateFromRotation(Vector3 rotation)
        {
            return Matrix.CreateFromYawPitchRoll(rotation.Y, rotation.X, rotation.Z);
        }




        public static Matrix CreateWorld(Vector3 position, Vector3 rotation)
        {
            Matrix result = Matrix.Identity;
            if (rotation != null) result *= CreateFromRotation(rotation);
            if (position != null) result *= Matrix.CreateTranslation(position);
            return result;
        }
    }
}
